Regular constructors have worked for GObject subclasses for a couple
of years now. While there is no functional difference to _init(),
it's simply nicer to use the same syntax for all classes, so quickly
change that before doing further changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3750>
'loaded': {},
},
}, class ExtensionPrefsDialog extends Adw.PreferencesWindow {
- _init(extension) {
- super._init({
+ constructor(extension) {
+ super({
title: extension.metadata.name,
search_enabled: false,
});
return klass;
}
- _init(extension, error) {
- super._init();
+ constructor(extension, error) {
+ super();
this._addCustomStylesheet();